#ifndef PATIENTRECORDITEM_H
#define PATIENTRECORDITEM_H

#include <QWidget>
#include <QMouseEvent>

namespace Ui {
class PatientRecordItem;
}

class PatientRecordItem : public QWidget
{
    Q_OBJECT

public:
    explicit PatientRecordItem(QWidget *parent = 0);
    ~PatientRecordItem();

    void setIndex(int index);
    void setNumber(int number);
    void setId(QString id);
    void setName(QString name);
    void setAge(int age);
    void setBirthday(QString birthday);
    void setGender(int gender);
    void setVisitTime(QString visitTime);
    void setPhone(QString phone);
    void setAddr(QString addr);
    int getNumber();
    void clear();
protected:
    void mousePressEvent(QMouseEvent *ev);
    void mouseReleaseEvent(QMouseEvent *ev);

private:
    Ui::PatientRecordItem *ui;
    QPoint g_mousePos;
    int g_index;

signals:
    void clickedSignal(int index);
};

#endif // PATIENTRECORDITEM_H
